#!/Library/Frameworks/Python.framework/Versions/Current/bin/python

import wsgiref.handlers
import whiff.resolver
import sys
# add the path to the directory containing the "words" root directory to the python path
sys.path.append("/usr/local/apache2/py")
import words

# create a WSGI application to serve the whiffTest directory
application = whiff.resolver.moduleRootApplication("/cgi-bin/words.cgi", words)

# assign the WORDFILE static resource to the swahili word list file location
application.registerStaticResource(prefix="WORDFILE", 
                                   resourceValue="/usr/local/apache2/data/swahili")

# serve a CGI request using the directory
wsgiref.handlers.CGIHandler().run(application)
